$reffile="file_final_ucsc";
open(BUFF,$reffile);
open(WRBUFF,">out_file_final_ucsc");
$line = <BUFF>;
print WRBUFF $line;
while($line = <BUFF>)
{
        chomp($line);
        @array = split(/\t/,$line);
        $array[5] =~ s/M/26/g;
        $array[5] =~ s/X/23/g;
        $array[5] =~ s/Y/24/g;
        #print $array[5]."\n";
        $array[5] =~ s/_random//g;
	$start = $array[3]-10000;
        if($start < 0)
        {
                $start =0;
         }
                #$stop = $arr[1];
        $stop = $array[4]+10000;
	print  WRBUFF $array[0]."\t".$array[1]."\t".$array[2]."\t".$start."\t".$stop."\t".$array[5]."\n";
}

